package com.healthy.support.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.healthy.common.core.annotation.Excel;
import com.healthy.common.core.web.domain.BaseEntity;

/**
 * 聊天内容对象 messages
 * 
 * @author 束伟
 * @date 2024-03-29
 */
public class Messages extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 消息的唯一标识符 */
    private Long messageId;

    /** 消息所属的会话ID */
    @Excel(name = "消息所属的会话ID")
    private Long sessionId;

    /** 消息发送者的类型（用户或客服） */
    @Excel(name = "消息发送者的类型", readConverterExp = "用=户或客服")
    private String senderType;

    /** 消息发送者的ID（用户ID或客服ID） */
    @Excel(name = "消息发送者的ID", readConverterExp = "用=户ID或客服ID")
    private Long senderId;

    /** 消息的内容 */
    @Excel(name = "消息的内容")
    private String content;

    /** 消息发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "消息发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sentAt;

    /** 消息被读取的时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "消息被读取的时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date readAt;

    /** 备用列1 */
    @Excel(name = "备用列1")
    private String spareColumn1;

    /** 备用列2 */
    @Excel(name = "备用列2")
    private String spareColumn2;

    /** 备用列3 */
    @Excel(name = "备用列3")
    private String spareColumn3;

    public void setMessageId(Long messageId) 
    {
        this.messageId = messageId;
    }

    public Long getMessageId() 
    {
        return messageId;
    }
    public void setSessionId(Long sessionId) 
    {
        this.sessionId = sessionId;
    }

    public Long getSessionId() 
    {
        return sessionId;
    }
    public void setSenderType(String senderType) 
    {
        this.senderType = senderType;
    }

    public String getSenderType() 
    {
        return senderType;
    }
    public void setSenderId(Long senderId) 
    {
        this.senderId = senderId;
    }

    public Long getSenderId() 
    {
        return senderId;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setSentAt(Date sentAt) 
    {
        this.sentAt = sentAt;
    }

    public Date getSentAt() 
    {
        return sentAt;
    }
    public void setReadAt(Date readAt) 
    {
        this.readAt = readAt;
    }

    public Date getReadAt() 
    {
        return readAt;
    }
    public void setSpareColumn1(String spareColumn1) 
    {
        this.spareColumn1 = spareColumn1;
    }

    public String getSpareColumn1() 
    {
        return spareColumn1;
    }
    public void setSpareColumn2(String spareColumn2) 
    {
        this.spareColumn2 = spareColumn2;
    }

    public String getSpareColumn2() 
    {
        return spareColumn2;
    }
    public void setSpareColumn3(String spareColumn3) 
    {
        this.spareColumn3 = spareColumn3;
    }

    public String getSpareColumn3() 
    {
        return spareColumn3;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("messageId", getMessageId())
            .append("sessionId", getSessionId())
            .append("senderType", getSenderType())
            .append("senderId", getSenderId())
            .append("content", getContent())
            .append("sentAt", getSentAt())
            .append("readAt", getReadAt())
            .append("spareColumn1", getSpareColumn1())
            .append("spareColumn2", getSpareColumn2())
            .append("spareColumn3", getSpareColumn3())
            .toString();
    }
}
